package com.blockchain.front.servlets;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.blockchain.framework.service.ServiceSession;


public class Language extends AbstractFrontServlet {
	private static final long serialVersionUID = 1L;

	@Override
	protected boolean mustAuthenticated() {
		return false;
	}
	
	@Override
	protected void processGet(HttpServletRequest request,
			HttpServletResponse response, ServiceSession serviceSession)throws Throwable {
			PrintWriter out=response.getWriter();
			try {
				getResourceProvider().getLanguageDefine().setLanguage(request.getParameter("lang"),request,response);
				out.write("1");
			}catch(Throwable e) {
				out.write(e.getMessage());
			}
		
	}
}
